
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>附:验证控件SDK源码 · Passport业务手册</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="xiajie <xiajie01@baidu.com>">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-multipart/multipart.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-codeblock-filename/block.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-page-footer-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-okaidia.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-custom-js-css/03c70a23567f2990c05f5cb8c64400a2-main.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-custom-js-css/27b4a027a84f513ce71206e15df835dc-folding-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../portrait/" />
    
    
    <link rel="prev" href="auth.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
    

    

    
        
        <li class="header">[第一章] 开发指南</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                        <b>1.1.</b>
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../guides/develop/awareness.html">
            
                <a href="../../guides/develop/awareness.html">
            
                    
                        <b>1.2.</b>
                    
                    新人必读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../guides/develop/doc.html">
            
                <a href="../../guides/develop/doc.html">
            
                    
                        <b>1.3.</b>
                    
                    文档撰写
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../guides/services.html">
            
                <a href="../../guides/services.html">
            
                    
                        <b>1.4.</b>
                    
                    流量接入介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../guides/services/shifen.html">
            
                <a href="../../guides/services/shifen.html">
            
                    
                        <b>1.4.1.</b>
                    
                    灵渠(shifen平台)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../guides/services/bgw.html">
            
                <a href="../../guides/services/bgw.html">
            
                    
                        <b>1.4.2.</b>
                    
                    BGW
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../guides/services/bfe.html">
            
                <a href="../../guides/services/bfe.html">
            
                    
                        <b>1.4.3.</b>
                    
                    BFE
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../guides/passport.html">
            
                <a href="../../guides/passport.html">
            
                    
                        <b>1.5.</b>
                    
                    Pass技术架构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../../guides/passport/dbgate.html">
            
                <a href="../../guides/passport/dbgate.html">
            
                    
                        <b>1.5.1.</b>
                    
                    DBGATE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../../guides/passport/session.html">
            
                <a href="../../guides/passport/session.html">
            
                    
                        <b>1.5.2.</b>
                    
                    SESSION
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                        <b>1.6.</b>
                    
                    开发环境配置
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../guides/environment/instances.html">
            
                <a href="../../guides/environment/instances.html">
            
                    
                        <b>1.6.1.</b>
                    
                    开发机实例创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../guides/environment/server_tool.html">
            
                <a href="../../guides/environment/server_tool.html">
            
                    
                        <b>1.6.2.</b>
                    
                    开发机配套工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../guides/environment/tool.html">
            
                <a href="../../guides/environment/tool.html">
            
                    
                        <b>1.6.3.</b>
                    
                    本地常用工具
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">[第二章] 业务项目</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../projects/experiment/">
            
                <a href="../../projects/experiment/">
            
                    
                        <b>2.1.</b>
                    
                    分层实验平台
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="../../projects/experiment/concept.html">
            
                <a href="../../projects/experiment/concept.html">
            
                    
                        <b>2.1.1.</b>
                    
                    基本概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="../../projects/experiment/concept_parse.html">
            
                <a href="../../projects/experiment/concept_parse.html">
            
                    
                        <b>2.1.2.</b>
                    
                    概念剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="../../projects/experiment/quick_start.html">
            
                <a href="../../projects/experiment/quick_start.html">
            
                    
                        <b>2.1.3.</b>
                    
                    快速开始
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.3.1" data-path="../../projects/experiment/quick_start_experiment.html">
            
                <a href="../../projects/experiment/quick_start_experiment.html">
            
                    
                        <b>2.1.3.1.</b>
                    
                    实验创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.2" data-path="../../projects/experiment/quick_start_usage.html">
            
                <a href="../../projects/experiment/quick_start_usage.html">
            
                    
                        <b>2.1.3.2.</b>
                    
                    业务层应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3.3" data-path="../../projects/experiment/quick_start_chart.html">
            
                <a href="../../projects/experiment/quick_start_chart.html">
            
                    
                        <b>2.1.3.3.</b>
                    
                    报表查询
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.4" >
            
                <span>
            
                    
                        <b>2.1.4.</b>
                    
                    实现机制
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.4.1" data-path="../../projects/experiment/implement_platform.html">
            
                <a href="../../projects/experiment/implement_platform.html">
            
                    
                        <b>2.1.4.1.</b>
                    
                    实验平台
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.2" data-path="../../projects/experiment/implement_process.html">
            
                <a href="../../projects/experiment/implement_process.html">
            
                    
                        <b>2.1.4.2.</b>
                    
                    实验流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.3" data-path="../../projects/experiment/implement_sdk.html">
            
                <a href="../../projects/experiment/implement_sdk.html">
            
                    
                        <b>2.1.4.3.</b>
                    
                    SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.4" data-path="../../projects/experiment/implement_expression.html">
            
                <a href="../../projects/experiment/implement_expression.html">
            
                    
                        <b>2.1.4.4.</b>
                    
                    表达式执行器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4.5" data-path="../../projects/experiment/implement_chart.html">
            
                <a href="../../projects/experiment/implement_chart.html">
            
                    
                        <b>2.1.4.5.</b>
                    
                    通用报表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="../../projects/experiment/cases.html">
            
                <a href="../../projects/experiment/cases.html">
            
                    
                        <b>2.1.5.</b>
                    
                    应用案例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="../../projects/experiment/reference.html">
            
                <a href="../../projects/experiment/reference.html">
            
                    
                        <b>2.1.6.</b>
                    
                    参考资料
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../../projects/auth-widget/">
            
                <a href="../../projects/auth-widget/">
            
                    
                        <b>2.2.</b>
                    
                    验证控件重构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" >
            
                <span>
            
                    
                        <b>2.2.1.</b>
                    
                    当前现状
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1.1" data-path="../../projects/auth-widget/current/authtoken.html">
            
                <a href="../../projects/auth-widget/current/authtoken.html">
            
                    
                        <b>2.2.1.1.</b>
                    
                    初始化阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.2" data-path="../../projects/auth-widget/current/render.html">
            
                <a href="../../projects/auth-widget/current/render.html">
            
                    
                        <b>2.2.1.2.</b>
                    
                    渲染阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.3" data-path="../../projects/auth-widget/current/check.html">
            
                <a href="../../projects/auth-widget/current/check.html">
            
                    
                        <b>2.2.1.3.</b>
                    
                    验证阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.4" data-path="../../projects/auth-widget/current/use.html">
            
                <a href="../../projects/auth-widget/current/use.html">
            
                    
                        <b>2.2.1.4.</b>
                    
                    使用阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.5" data-path="../../projects/auth-widget/current/now.html">
            
                <a href="../../projects/auth-widget/current/now.html">
            
                    
                        <b>2.2.1.5.</b>
                    
                    使用场景
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="../../projects/auth-widget/refactor.html">
            
                <a href="../../projects/auth-widget/refactor.html">
            
                    
                        <b>2.2.2.</b>
                    
                    重构实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.2.1" data-path="../../projects/auth-widget/refactor/context.html">
            
                <a href="../../projects/auth-widget/refactor/context.html">
            
                    
                        <b>2.2.2.1.</b>
                    
                    验证控件上下文
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.2" data-path="../../projects/auth-widget/refactor/interface.html">
            
                <a href="../../projects/auth-widget/refactor/interface.html">
            
                    
                        <b>2.2.2.2.</b>
                    
                    验证控件抽象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.3" data-path="../../projects/auth-widget/refactor/mobile.html">
            
                <a href="../../projects/auth-widget/refactor/mobile.html">
            
                    
                        <b>2.2.2.3.</b>
                    
                    手机验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.4" data-path="../../projects/auth-widget/refactor/email.html">
            
                <a href="../../projects/auth-widget/refactor/email.html">
            
                    
                        <b>2.2.2.4.</b>
                    
                    邮箱验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.5" data-path="../../projects/auth-widget/refactor/facematch.html">
            
                <a href="../../projects/auth-widget/refactor/facematch.html">
            
                    
                        <b>2.2.2.5.</b>
                    
                    刷脸验证
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.3" >
            
                <span>
            
                    
                        <b>2.2.3.</b>
                    
                    新版使用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.3.1" data-path="../../projects/auth-widget/new/authtoken.html">
            
                <a href="../../projects/auth-widget/new/authtoken.html">
            
                    
                        <b>2.2.3.1.</b>
                    
                    初始化阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.2" data-path="../../projects/auth-widget/new/render.html">
            
                <a href="../../projects/auth-widget/new/render.html">
            
                    
                        <b>2.2.3.2.</b>
                    
                    渲染阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.3" data-path="../../projects/auth-widget/new/check.html">
            
                <a href="../../projects/auth-widget/new/check.html">
            
                    
                        <b>2.2.3.3.</b>
                    
                    验证阶段
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.4" data-path="../../projects/auth-widget/new/use.html">
            
                <a href="../../projects/auth-widget/new/use.html">
            
                    
                        <b>2.2.3.4.</b>
                    
                    使用阶段
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../../projects/mobile-refactor/">
            
                <a href="../../projects/mobile-refactor/">
            
                    
                        <b>2.3.</b>
                    
                    联系手机
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="../../projects/mobile-refactor/ppui.html">
            
                <a href="../../projects/mobile-refactor/ppui.html">
            
                    
                        <b>2.3.1.</b>
                    
                    业务层
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="../../projects/mobile-refactor/dbgate.html">
            
                <a href="../../projects/mobile-refactor/dbgate.html">
            
                    
                        <b>2.3.2.</b>
                    
                    后端
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="../../projects/mobile-refactor/plan.html">
            
                <a href="../../projects/mobile-refactor/plan.html">
            
                    
                        <b>2.3.3.</b>
                    
                    开发方案
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../../projects/portrait-to-orp/orp/">
            
                <a href="../../projects/portrait-to-orp/orp/">
            
                    
                        <b>2.4.</b>
                    
                    头像迁移ORP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="../../projects/portrait-to-orp/orp/evaluate.html">
            
                <a href="../../projects/portrait-to-orp/orp/evaluate.html">
            
                    
                        <b>2.4.1.</b>
                    
                    流量评估
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="../../projects/portrait-to-orp/orp/deploy.html">
            
                <a href="../../projects/portrait-to-orp/orp/deploy.html">
            
                    
                        <b>2.4.2.</b>
                    
                    服务部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.3" data-path="../../projects/portrait-to-orp/orp/test.html">
            
                <a href="../../projects/portrait-to-orp/orp/test.html">
            
                    
                        <b>2.4.3.</b>
                    
                    测试方案
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.4" data-path="../../projects/portrait-to-orp/orp/test-result.html">
            
                <a href="../../projects/portrait-to-orp/orp/test-result.html">
            
                    
                        <b>2.4.4.</b>
                    
                    测试结论
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.5" data-path="../../projects/portrait-to-orp/orp/bug.html">
            
                <a href="../../projects/portrait-to-orp/orp/bug.html">
            
                    
                        <b>2.4.5.</b>
                    
                    BUG收集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.6" data-path="../../projects/portrait-to-orp/orp/service.html">
            
                <a href="../../projects/portrait-to-orp/orp/service.html">
            
                    
                        <b>2.4.6.</b>
                    
                    依赖服务梳理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.7" data-path="../../projects/portrait-to-orp/orp/monitor.html">
            
                <a href="../../projects/portrait-to-orp/orp/monitor.html">
            
                    
                        <b>2.4.7.</b>
                    
                    监控规则梳理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.8" data-path="../../projects/portrait-to-orp/orp/plan.html">
            
                <a href="../../projects/portrait-to-orp/orp/plan.html">
            
                    
                        <b>2.4.8.</b>
                    
                    计划排期
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../../projects/experiment/trace/">
            
                <a href="../../projects/experiment/trace/">
            
                    
                        <b>2.5.</b>
                    
                    TraceID机制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="../../projects/experiment/trace/concept.html">
            
                <a href="../../projects/experiment/trace/concept.html">
            
                    
                        <b>2.5.1.</b>
                    
                    基本概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2" >
            
                <span>
            
                    
                        <b>2.5.2.</b>
                    
                    实现机制
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.2.1" data-path="../../projects/experiment/trace/trace_id.html">
            
                <a href="../../projects/experiment/trace/trace_id.html">
            
                    
                        <b>2.5.2.1.</b>
                    
                    TraceID及管理器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.2" data-path="../../projects/experiment/trace/flow_id.html">
            
                <a href="../../projects/experiment/trace/flow_id.html">
            
                    
                        <b>2.5.2.2.</b>
                    
                    流程定义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.3" data-path="../../projects/experiment/trace/flow_handle.html">
            
                <a href="../../projects/experiment/trace/flow_handle.html">
            
                    
                        <b>2.5.2.3.</b>
                    
                    流程处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.4" data-path="../../projects/experiment/trace/exp_append_trace_id.html">
            
                <a href="../../projects/experiment/trace/exp_append_trace_id.html">
            
                    
                        <b>2.5.2.4.</b>
                    
                    小流量实验
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.5" data-path="../../projects/experiment/trace/trace_id_transfer.html">
            
                <a href="../../projects/experiment/trace/trace_id_transfer.html">
            
                    
                        <b>2.5.2.5.</b>
                    
                    TraceID传递
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.2.5.1" data-path="../../projects/experiment/trace/trace_id_transfer_ppui.html">
            
                <a href="../../projects/experiment/trace/trace_id_transfer_ppui.html">
            
                    
                        <b>2.5.2.5.1.</b>
                    
                    PPUI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.5.2" data-path="../../projects/experiment/trace/trace_id_transfer_fe.html">
            
                <a href="../../projects/experiment/trace/trace_id_transfer_fe.html">
            
                    
                        <b>2.5.2.5.2.</b>
                    
                    FE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2.5.3" data-path="../../projects/experiment/trace/trace_id_transfer_na.html">
            
                <a href="../../projects/experiment/trace/trace_id_transfer_na.html">
            
                    
                        <b>2.5.2.5.3.</b>
                    
                    NA端
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5.2.6" data-path="../../projects/experiment/trace/log.html">
            
                <a href="../../projects/experiment/trace/log.html">
            
                    
                        <b>2.5.2.6.</b>
                    
                    日志记录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="../../projects/face-cluster/">
            
                <a href="../../projects/face-cluster/">
            
                    
                        <b>2.6.</b>
                    
                    人脸聚类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1" >
            
                <span>
            
                    
                        <b>2.6.1.</b>
                    
                    存量聚类
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1.1" data-path="../../projects/face-cluster/clustering/feature.html">
            
                <a href="../../projects/face-cluster/clustering/feature.html">
            
                    
                        <b>2.6.1.1.</b>
                    
                    特征提取
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.1.2" data-path="../../projects/face-cluster/clustering/cluster.html">
            
                <a href="../../projects/face-cluster/clustering/cluster.html">
            
                    
                        <b>2.6.1.2.</b>
                    
                    聚类输出
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6.2" data-path="../../projects/face-cluster/face.html">
            
                <a href="../../projects/face-cluster/face.html">
            
                    
                        <b>2.6.2.</b>
                    
                    人脸管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.2.1" data-path="../../projects/face-cluster/face/register.html">
            
                <a href="../../projects/face-cluster/face/register.html">
            
                    
                        <b>2.6.2.1.</b>
                    
                    人脸注册
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.2.2" data-path="../../projects/face-cluster/face/search.html">
            
                <a href="../../projects/face-cluster/face/search.html">
            
                    
                        <b>2.6.2.2.</b>
                    
                    人脸搜索
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6.3" >
            
                <span>
            
                    
                        <b>2.6.3.</b>
                    
                    业务改造
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.3.1" data-path="../../projects/face-cluster/refactor/face.html">
            
                <a href="../../projects/face-cluster/refactor/face.html">
            
                    
                        <b>2.6.3.1.</b>
                    
                    刷脸开关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6.3.2" data-path="../../projects/face-cluster/refactor/face_login.html">
            
                <a href="../../projects/face-cluster/refactor/face_login.html">
            
                    
                        <b>2.6.3.2.</b>
                    
                    刷脸登录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6.4" data-path="../../projects/face-cluster/question.html">
            
                <a href="../../projects/face-cluster/question.html">
            
                    
                        <b>2.6.4.</b>
                    
                    问题探讨
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="../../projects/face-platform/">
            
                <a href="../../projects/face-platform/">
            
                    
                        <b>2.7.</b>
                    
                    Pass人脸库建设
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.7.1" data-path="../../projects/face-platform/phase-1.html">
            
                <a href="../../projects/face-platform/phase-1.html">
            
                    
                        <b>2.7.1.</b>
                    
                    一期
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="../../projects/face-platform/phase-2.html">
            
                <a href="../../projects/face-platform/phase-2.html">
            
                    
                        <b>2.7.2.</b>
                    
                    二期
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="../../projects/ipv6/">
            
                <a href="../../projects/ipv6/">
            
                    
                        <b>2.8.</b>
                    
                    IPV6兼容改造
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9" >
            
                <span>
            
                    
                        <b>2.9.</b>
                    
                    NA登录重构
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.9.1" data-path="../../projects/nalogin-refactor/">
            
                <a href="../../projects/nalogin-refactor/">
            
                    
                        <b>2.9.1.</b>
                    
                    需求
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.2" data-path="../../projects/nalogin-refactor/experiment.html">
            
                <a href="../../projects/nalogin-refactor/experiment.html">
            
                    
                        <b>2.9.2.</b>
                    
                    新版页面小流量方案
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3" >
            
                <span>
            
                    
                        <b>2.9.3.</b>
                    
                    接口改造
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.9.3.1" data-path="../../projects/nalogin-refactor/refactor/check.html">
            
                <a href="../../projects/nalogin-refactor/refactor/check.html">
            
                    
                        <b>2.9.3.1.</b>
                    
                    帐号检测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.2" data-path="../../projects/nalogin-refactor/refactor/history.html">
            
                <a href="../../projects/nalogin-refactor/refactor/history.html">
            
                    
                        <b>2.9.3.2.</b>
                    
                    获取登录历史
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.3" data-path="../../projects/nalogin-refactor/refactor/sendSMS.html">
            
                <a href="../../projects/nalogin-refactor/refactor/sendSMS.html">
            
                    
                        <b>2.9.3.3.</b>
                    
                    发送短信验证码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.4" data-path="../../projects/nalogin-refactor/refactor/smsLogin.html">
            
                <a href="../../projects/nalogin-refactor/refactor/smsLogin.html">
            
                    
                        <b>2.9.3.4.</b>
                    
                    短信登录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.9.3.5" data-path="../../projects/nalogin-refactor/refactor/login.html">
            
                <a href="../../projects/nalogin-refactor/refactor/login.html">
            
                    
                        <b>2.9.3.5.</b>
                    
                    帐密登录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.9.4" data-path="../../projects/nalogin-refactor/smarty.html">
            
                <a href="../../projects/nalogin-refactor/smarty.html">
            
                    
                        <b>2.9.4.</b>
                    
                    smarty模板
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="../../projects/login-refactor/">
            
                <a href="../../projects/login-refactor/">
            
                    
                        <b>2.10.</b>
                    
                    登录服务重构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="../../projects/login-refactor/api.html">
            
                <a href="../../projects/login-refactor/api.html">
            
                    
                        <b>2.10.1.</b>
                    
                    接口设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="../../projects/login-refactor/server.html">
            
                <a href="../../projects/login-refactor/server.html">
            
                    
                        <b>2.10.2.</b>
                    
                    服务端实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="../../projects/login-refactor/plan.html">
            
                <a href="../../projects/login-refactor/plan.html">
            
                    
                        <b>2.10.3.</b>
                    
                    开发计划
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="../../projects/portrait-url-refactor/">
            
                <a href="../../projects/portrait-url-refactor/">
            
                    
                        <b>2.11.</b>
                    
                    头像地址重构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="../../projects/portrait-to-bos/">
            
                <a href="../../projects/portrait-to-bos/">
            
                    
                        <b>2.12.</b>
                    
                    头像存储迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.13" data-path="../../projects/log-masking/">
            
                <a href="../../projects/log-masking/">
            
                    
                        <b>2.13.</b>
                    
                    业务日志脱敏
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">[第三章] 服务接入</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="./">
            
                <a href="./">
            
                    
                        <b>3.1.</b>
                    
                    验证控件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="prepare.html">
            
                <a href="prepare.html">
            
                    
                        <b>3.1.1.</b>
                    
                    前期准备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="token.html">
            
                <a href="token.html">
            
                    
                        <b>3.1.2.</b>
                    
                    AuthToken生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="wap.html">
            
                <a href="wap.html">
            
                    
                        <b>3.1.3.</b>
                    
                    NA/WAP端接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="pc.html">
            
                <a href="pc.html">
            
                    
                        <b>3.1.4.</b>
                    
                    PC端接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="auth.html">
            
                <a href="auth.html">
            
                    
                        <b>3.1.5.</b>
                    
                    合法性校验
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.1.6" data-path="code.html">
            
                <a href="code.html">
            
                    
                        <b>3.1.6.</b>
                    
                    附:验证控件SDK源码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../portrait/">
            
                <a href="../portrait/">
            
                    
                        <b>3.2.</b>
                    
                    头像接入
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >附:验证控件SDK源码</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x9644;&#xFF1A;&#x9A8C;&#x8BC1;&#x63A7;&#x4EF6;sdk&#x6E90;&#x7801;"><a name="&#x9644;&#xFF1A;&#x9A8C;&#x8BC1;&#x63A7;&#x4EF6;sdk&#x6E90;&#x7801;" class="anchor-navigation-ex-anchor" href="#&#x9644;&#xFF1A;&#x9A8C;&#x8BC1;&#x63A7;&#x4EF6;sdk&#x6E90;&#x7801;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9644;&#xFF1A;&#x9A8C;&#x8BC1;&#x63A7;&#x4EF6;SDK&#x6E90;&#x7801;</h1>
<p>ODP&#x4E2D;Passport&#x9A8C;&#x8BC1;&#x63A7;&#x4EF6;&#x5E93;&#x5DF2;&#x957F;&#x671F;&#x672A;&#x7EF4;&#x62A4;&#xFF0C;&#x5DF2;&#x4E0D;&#x517C;&#x5BB9;&#x76EE;&#x524D;&#x903B;&#x8F91;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x6B64;&#x7C7B;&#x8FDB;&#x884C;&#x66FF;&#x4EE3;&#xFF0C;&#x4EA7;&#x54C1;&#x7EBF;&#x53EF;&#x91CD;&#x547D;&#x540D;&#x6B64;&#x7C7B;&#x3002;</p>
<pre class="language-"><code class="lang-php"><span class="token delimiter important">&lt;?php</span>

<span class="token comment">/**
 * &#x9A8C;&#x8BC1;&#x63A7;&#x4EF6;
 *
 * @version 2018-10-27 21:05:55
 * @author xinmeng@baidu.com
 * @author xiajie01@baidu.com
 */</span>
<span class="token keyword">class</span> <span class="token class-name">Bd_Passport_AuthWidgetV2</span> <span class="token punctuation">{</span>

    <span class="token comment">/**
     * &#x9ED8;&#x8BA4;&#x9A8C;&#x8BC1;&#x540D;&#x79F0;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">NAME_DEFAULT</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;def&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * SAPI
     * @var Bd_Passport_SAPI
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$sapi</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * api &#x5730;&#x5740;
     *
     * @var string
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$url</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x5DF2;&#x9A8C;&#x8BC1;&#x4FE1;&#x606F;
     * @var array
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$authed</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x9700;&#x8981;&#x9A8C;&#x8BC1;&#x7684;&#x4F1A;&#x5316;&#x540D;
     *
     * @var array
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$names</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x662F;&#x5426;&#x4F7F;&#x7528;&#x9AD8;&#x5B89;&#x5168;&#x4F1A;&#x8BDD;&#xFF08;&#x968F;&#x673A;&#x540D;&#x79F0;&#xFF09;
     *
     * @var boolean
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$isSecure</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x9A8C;&#x8BC1;&#x63CF;&#x8FF0;
     *
     * @var string
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$brief</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x4F1A;&#x8BDD;&#x7F16;&#x53F7;&#xFF08;&#x52A8;&#x6001;name&#xFF09;
     *
     * @var string
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$authsid</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x90AE;&#x7BB1;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_EMAIL</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;email&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x624B;&#x673A;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_MOBILE</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;mobile&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x539F;&#x59CB;&#x90AE;&#x7BB1;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_ORIGINAL_EMAIL</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;original_email&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x539F;&#x59CB;&#x624B;&#x673A;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_ORIGINAL_MOBILE</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;original_mobile&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x52A8;&#x6001;&#x5BC6;&#x7801;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_OTP</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;otp&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x4E8C;&#x7EF4;&#x7801;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_QRCODE</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;qrcode&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x4E00;&#x952E;&#x9A8C;&#x8BC1;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_ONEKEY</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;onekey&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x5BC6;&#x7801;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_PASSWORD</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;password&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x53EF;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5; &#x5BC6;&#x4FDD;&#x95EE;&#x9898;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_QUESTION</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;question&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x94F6;&#x884C;&#x5361;&#x9884;&#x7559;&#x624B;&#x673A;&#x53F7;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_BANK_MOBILE</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;bankmobile&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x8EAB;&#x4EFD;&#x8BC1;&#x4FE1;&#x606F;&#x9A8C;&#x8BC1;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_IDCARD</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;idcard&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x6D3B;&#x4F53;&#x8BC6;&#x522B;+&#x4EBA;&#x8138;&#x5BF9;&#x6BD4;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_FACEMATCH</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;facematch&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x94F6;&#x884C;&#x5361;&#x53F7;&#x7801;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_BANK_CARD</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;bankcard&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x7528;&#x6237;&#x540D;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_USERNAME</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;username&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/*
     * &#x5B9E;&#x540D;&#x5316;&#x9A8C;&#x8BC1;&#x624B;&#x673A;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">FIELD_VERIFYMOBILE</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;verifymobile&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x9A8C;&#x8BC1;&#x53EF;&#x9009;&#x6027; &#x4EFB;&#x4F55;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">SELECT_ANY</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;any&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x9A8C;&#x8BC1;&#x53EF;&#x9009;&#x6027; &#x6700;&#x9AD8;&#x7EA7;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">SELECT_TOP</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;top&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x9A8C;&#x8BC1;&#x53EF;&#x9009;&#x6027; &#x81EA;&#x5B9A;&#x4E49;&#x987A;&#x5E8F;
     */</span>
    <span class="token keyword">const</span> <span class="token constant">SELECT_CUSTOM</span> <span class="token operator">=</span> <span class="token single-quoted-string string">&apos;cus&apos;</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     *
     *
     * &#x914D;&#x7F6E;&#xFF1A;
     * passport.conf
     * [sapi]
     * $tpl_$appid : $pass
     * [authwidget]
     * sapi_url : https://passport.baidu.com/v2/sapi/authwidget
     *
     * @param int $appid SAPI appid
     * @param string $tpl &#x4EA7;&#x54C1;&#x7EBF;&#x6807;&#x793A;
     */</span>
    <span class="token keyword">function</span> <span class="token function">__construct</span><span class="token punctuation">(</span><span class="token variable">$appid</span> <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token variable">$tpl</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span> <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Bd_Passport_SAPI</span><span class="token punctuation">(</span><span class="token variable">$appid</span><span class="token punctuation">,</span> <span class="token variable">$tpl</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token variable">$config</span> <span class="token operator">=</span> Bd_Passport_Conf<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token function">getConf</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;authwidget&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">url</span> <span class="token operator">=</span> <span class="token variable">$config</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;sapi_url&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x4F7F;&#x7528;&#x9AD8;&#x5B89;&#x5168;&#x7EA7;&#x522B;&#x7684;&#x4F1A;&#x8BDD;&#x8FC7;&#x7A0B;
     * &#x9A8C;&#x8BC1;&#x6210;&#x529F;&#x5C06;&#x8FD4;&#x56DE;authsid&#xFF0C;&#x9A8C;&#x8BC1;&#x67E5;&#x8BE2;&#x5C06;&#x9700;&#x8981;authsid&#x3002;
     *
     * @param boolean $isSecure &#x662F;&#x5426;&#x542F;&#x7528;&#x5B89;&#x5168;&#x4F1A;&#x8BDD;&#x8FC7;&#x7A0B;
     * @return Bd_Passport_AuthWidget
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">setIsSecure</span><span class="token punctuation">(</span><span class="token variable">$isSecure</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">isSecure</span> <span class="token operator">=</span> <span class="token variable">$isSecure</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x8BBE;&#x7F6E;&#x8BA4;&#x8BC1;&#x63CF;&#x8FF0;
     *
     * @param string $brief
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">setBrief</span><span class="token punctuation">(</span><span class="token variable">$brief</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">brief</span> <span class="token operator">=</span> <span class="token variable">$brief</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x83B7;&#x53D6;&#x4F1A;&#x8BDD;token&#xFF08;&#x83B7;&#x53D6;&#x63A7;&#x4EF6;&#x65F6;&#x4F7F;&#x7528;&#xFF09;
     * @example
     *          $widget = new Bd_Passport_AuthWidget(1, &apos;pp&apos;);
     *          $widget-&gt;getToken($userid, $baiduid, &apos;auth_mobile&apos;, $ip );
     *
     * @param int $userid &#x7528;&#x6237;&#x7F16;&#x53F7;
     * @param string $baiduid &#x5BA2;&#x6237;&#x7AEF;&#x552F;&#x4E00;&#x8BC6;&#x522B;&#x7801;&#x3002;&#x6D4F;&#x89C8;&#x5668;&#x53D6;Cookies&#x5185;baiduid&#xFF0C;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x81EA;&#x884C;&#x751F;&#x6210;&#xFF0C;&#x4FDD;&#x8BC1;&#x9A8C;&#x8BC1;&#x4F1A;&#x8BDD;&#x8FC7;&#x7A0B;&#x4E2D;&#x4E0D;&#x6539;&#x53D8;&#x5373;&#x53EF;&#x3002;
     * @param string $name &#x9A8C;&#x8BC1;&#x540D;&#x79F0;&#x3002;&#x540C;&#x4E00;&#x9A8C;&#x8BC1;&#x540D;&#x5BF9;&#x5E94;&#x591A;&#x4E2A;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#x548C;&#x53EF;&#x9009;&#x6027;&#x65F6;&#x4F1A;&#x9020;&#x6210;&#x9A8C;&#x8BC1;&#x9519;&#x8BEF;&#x3002;
     *                      &#x5982;&#x540C;&#x4E00;&#x4EA7;&#x54C1;&#x7EBF;&#x6709;&#x591A;&#x4E2A;&#x529F;&#x80FD;&#x9700;&#x8981;&#x8FDB;&#x884C;&#x8EAB;&#x4EFD;&#x9A8C;&#x8BC1;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x4E0D;&#x540C;&#x7684;&#x540D;&#x79F0;&#x3002;
     *                      &#x4E0D;&#x540C;&#x540D;&#x79F0;&#x53CD;&#x4F5C;&#x5F0A;&#x8BA1;&#x6570;&#x76F8;&#x4E92;&#x9694;&#x79BB;&#x3002;
     * @param string $ip &#x5BA2;&#x6237;IP&#xFF08;IPv4&#xFF09;&#x3002;&#x5BA2;&#x6237;&#x7AEF;&#x4F7F;&#x7528;&#x65F6;&#xFF0C;&#x6B64;&#x4E3A;&#x53EF;&#x9009;&#x53C2;&#x6570;&#x3002;&#x670D;&#x52A1;&#x7AEF;&#x4F7F;&#x7528;&#x65F6;&#x8BF7;&#x4F20;&#x9012;&#x51C6;&#x786E;&#x5BA2;&#x6237;&#x7AEF;&#x8FDE;&#x63A5;IP&#x3002;
     * @param array $fields &#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#xFF0C;&#x53EF;&#x9009;&#x53C2;&#x6570;&#x5EFA;&#x8BAE;&#x7559;&#x7A7A;&#x3002;&#x4E3A;&#x7A7A;&#x65F6;&#x8FD4;&#x56DE;&#x6240;&#x6709;&#x53EF;&#x7528;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#x3002;&#x53EF;&#x9009;&#x586B;&#x591A;&#x4E2A;&#x3002;
     * @param string $select &#x53EF;&#x9009;&#x62E9;&#x6027;
     *                        top &#x9009;&#x62E9;&#x6700;&#x9AD8;&#x7EA7;&#x522B;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F; Bd_Passport_AuthWidget::SELECT_TOP
     *                        any &#x53EF;&#x4EFB;&#x610F;&#x9009;&#x62E9;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;   Bd_Passport_AuthWidget::SELECT_ANY
     * @return string
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">getToken</span><span class="token punctuation">(</span><span class="token variable">$userid</span><span class="token punctuation">,</span> <span class="token variable">$baiduid</span><span class="token punctuation">,</span> <span class="token variable">$name</span><span class="token punctuation">,</span> <span class="token variable">$ip</span><span class="token punctuation">,</span> <span class="token variable">$fields</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">,</span> <span class="token variable">$select</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>

        <span class="token variable">$info</span> <span class="token operator">=</span> <span class="token function">json_encode</span><span class="token punctuation">(</span><span class="token keyword">array</span><span class="token punctuation">(</span>
            <span class="token variable">$userid</span><span class="token punctuation">,</span>
            <span class="token variable">$baiduid</span><span class="token punctuation">,</span>
            <span class="token variable">$name</span> <span class="token operator">?</span> <span class="token variable">$name</span> <span class="token punctuation">:</span> self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">NAME_DEFAULT</span><span class="token punctuation">,</span>
            <span class="token variable">$fields</span><span class="token punctuation">,</span>
            <span class="token variable">$select</span><span class="token punctuation">,</span>
            <span class="token variable">$ip</span><span class="token punctuation">,</span>
            <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">isSecure</span> <span class="token operator">?</span> <span class="token number">1</span> <span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
            <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">brief</span>
        <span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token variable">$pack</span> <span class="token operator">=</span> <span class="token function">json_encode</span><span class="token punctuation">(</span>
            <span class="token keyword">array</span><span class="token punctuation">(</span>
                <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getTpl</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
                <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getAppid</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
                Bd_Crypt_Rc4<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token function">rc4</span><span class="token punctuation">(</span><span class="token variable">$info</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;ENCODE&apos;</span><span class="token punctuation">,</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getKey</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
            <span class="token punctuation">)</span>
        <span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> Bd_Crypt_Rc4<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token function">rc4</span><span class="token punctuation">(</span><span class="token variable">$pack</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;ENCODE&apos;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x5B89;&#x5168;&#x4F1A;&#x8BDD;&#x9A8C;&#x8BC1;&#x6210;&#x529F;&#x540E;&#x8FD4;&#x56DE;&#x7684;authsid
     *
     * @param string $authsid
     * @return Bd_Passport_AuthWidget
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">setAuthSID</span><span class="token punctuation">(</span><span class="token variable">$authsid</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authsid</span> <span class="token operator">=</span> <span class="token variable">$authsid</span><span class="token punctuation">;</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">isSecure</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x8BBE;&#x5B9A;&#x67E5;&#x8BE2;&#x548C;&#x9A8C;&#x8BC1;&#x7684;&#x9A8C;&#x8BC1;&#x540D;&#x79F0;&#xFF08;&#x5982;&#x4E0D;&#x8BBE;&#x5B9A;&#x5219;&#x4F7F;&#x7528;&#x9ED8;&#x8BA4;&#x67E5;&#x8BE2;&#x540D;&#x79F0;&#xFF09;
     * query &#x524D;&#x4F7F;&#x7528;
     * isAuthed &#x524D;&#x4F7F;&#x7528;&#xFF0C;&#x9A8C;&#x8BC1;&#x540D;&#x79F0;&#x53EF;&#x4E3A;query&#x5B50;&#x96C6;
     *
     * @param string $name &#x9A8C;&#x8BC1;&#x540D;&#x79F0;&#x3002;&#x540C;&#x4E00;&#x9A8C;&#x8BC1;&#x540D;&#x5BF9;&#x5E94;&#x591A;&#x4E2A;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#x548C;&#x53EF;&#x9009;&#x6027;&#x65F6;&#x4F1A;&#x9020;&#x6210;&#x9A8C;&#x8BC1;&#x9519;&#x8BEF;&#x3002;
     *                      &#x5982;&#x540C;&#x4E00;&#x4EA7;&#x54C1;&#x7EBF;&#x6709;&#x591A;&#x4E2A;&#x529F;&#x80FD;&#x9700;&#x8981;&#x8FDB;&#x884C;&#x8EAB;&#x4EFD;&#x9A8C;&#x8BC1;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x4E0D;&#x540C;&#x7684;&#x540D;&#x79F0;&#x3002;
     *                      &#x4E0D;&#x540C;&#x540D;&#x79F0;&#x53CD;&#x4F5C;&#x5F0A;&#x8BA1;&#x6570;&#x76F8;&#x4E92;&#x9694;&#x79BB;&#x3002;
     * @param string $_ &#x9A8C;&#x8BC1;&#x540D;&#x79F0; &#x53EF;&#x591A;&#x4E2A;
     * @param string $__
     * @return Bd_Passport_AuthWidget
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">setNames</span><span class="token punctuation">(</span><span class="token variable">$name</span><span class="token punctuation">,</span> <span class="token variable">$_</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">,</span> <span class="token variable">$__</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span> <span class="token operator">=</span> <span class="token function">func_get_args</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x67E5;&#x8BE2;&#x5DF2;&#x9A8C;&#x8BC1;&#x7684;&#x4FE1;&#x606F;
     * @example
     *          $widget = new Bd_Passport_AuthWidget(1, &apos;pp&apos;);
     *          $authed = $widget-&gt;setNames(&apos;test&apos;)-&gt;query(&apos;104113153&apos;, &apos;test123&apos;, &apos;127.0.0.1&apos;, true);
     *
     * @param int $userid &#x7528;&#x6237;&#x7F16;&#x53F7;
     * @param string $baiduid &#x5BA2;&#x6237;&#x7AEF;&#x552F;&#x4E00;&#x8BC6;&#x522B;&#x7801;&#x3002;&#x6D4F;&#x89C8;&#x5668;&#x53D6;Cookies&#x5185;baiduid&#xFF0C;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x81EA;&#x884C;&#x751F;&#x6210;&#xFF0C;&#x4FDD;&#x8BC1;&#x9A8C;&#x8BC1;&#x4F1A;&#x8BDD;&#x8FC7;&#x7A0B;&#x4E2D;&#x4E0D;&#x6539;&#x53D8;&#x5373;&#x53EF;&#x3002;
     * @param string $ip &#x5BA2;&#x6237;IP&#xFF08;IPv4&#xFF09;&#x3002;&#x5BA2;&#x6237;&#x7AEF;&#x4F7F;&#x7528;&#x65F6;&#xFF0C;&#x6B64;&#x4E3A;&#x53EF;&#x9009;&#x53C2;&#x6570;&#x3002;&#x670D;&#x52A1;&#x7AEF;&#x4F7F;&#x7528;&#x65F6;&#x8BF7;&#x4F20;&#x9012;&#x51C6;&#x786E;&#x5BA2;&#x6237;&#x7AEF;&#x8FDE;&#x63A5;IP&#x3002;
     * @param boolean $isdel &#x67E5;&#x8BE2;&#x540E;&#x662F;&#x5426;&#x5220;&#x9664;&#x6570;&#x636E;
     * @deprecated
     * @return array
     *              errno &#x9519;&#x8BEF;&#x7801;
     *              errmsg &#x9519;&#x8BEF;&#x4FE1;&#x606F;
     *              fields &#x53EF;&#x7528;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5;&#x3002; &#x9519;&#x8BEF;&#x7801;&#x4E3A; 0&#x3001;1 &#x5747;&#x5305;&#x542B;.
     *              authed &#x5DF2;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5;&#x4E0E;&#x9A8C;&#x8BC1;&#x65F6;&#x95F4;&#xFF0C;&#x9519;&#x8BEF;&#x7801;&#x4E3A; 0 &#x65F6;&#x8F93;&#x51FA;&#x3002;
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">queryOld</span><span class="token punctuation">(</span><span class="token variable">$userid</span><span class="token punctuation">,</span> <span class="token variable">$baiduid</span><span class="token punctuation">,</span> <span class="token variable">$ip</span><span class="token punctuation">,</span> <span class="token variable">$isdel</span> <span class="token operator">=</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">setNames</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">NAME_DEFAULT</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">do</span> <span class="token punctuation">{</span>
            <span class="token variable">$names</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span><span class="token punctuation">;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">isSecure</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>

                <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">empty</span><span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authsid</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">break</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>

                <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$names</span> <span class="token keyword">as</span> <span class="token variable">$key</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$value</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token variable">$names</span><span class="token punctuation">[</span><span class="token variable">$key</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token variable">$value</span> <span class="token punctuation">.</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authsid</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
                <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span> <span class="token operator">=</span> <span class="token variable">$names</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getJSON</span><span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">url</span><span class="token punctuation">,</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
                <span class="token single-quoted-string string">&apos;action&apos;</span>  <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token single-quoted-string string">&apos;query&apos;</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;isdel&apos;</span>   <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$isdel</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;userid&apos;</span>  <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$userid</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;baiduid&apos;</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$baiduid</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;names&apos;</span>   <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$names</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;time&apos;</span>    <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;ip&apos;</span>      <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$ip</span><span class="token punctuation">,</span>
            <span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token boolean constant">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x67E5;&#x8BE2;&#x5DF2;&#x9A8C;&#x8BC1;&#x7684;&#x4FE1;&#x606F;
     * @example
     *          $widget = new Bd_Passport_AuthWidget(1, &apos;pp&apos;);
     *          $authed = $widget-&gt;setNames(&apos;test&apos;)-&gt;query(&apos;104113153&apos;, &apos;test123&apos;, &apos;127.0.0.1&apos;, true);
     *
     * @param int $userid &#x7528;&#x6237;&#x7F16;&#x53F7;
     * @param string $baiduid &#x5BA2;&#x6237;&#x7AEF;&#x552F;&#x4E00;&#x8BC6;&#x522B;&#x7801;&#x3002;&#x6D4F;&#x89C8;&#x5668;&#x53D6;Cookies&#x5185;baiduid&#xFF0C;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x81EA;&#x884C;&#x751F;&#x6210;&#xFF0C;&#x4FDD;&#x8BC1;&#x9A8C;&#x8BC1;&#x4F1A;&#x8BDD;&#x8FC7;&#x7A0B;&#x4E2D;&#x4E0D;&#x6539;&#x53D8;&#x5373;&#x53EF;&#x3002;
     * @param string $ip &#x5BA2;&#x6237;IP&#xFF08;IPv4&#xFF09;&#x3002;&#x5BA2;&#x6237;&#x7AEF;&#x4F7F;&#x7528;&#x65F6;&#xFF0C;&#x6B64;&#x4E3A;&#x53EF;&#x9009;&#x53C2;&#x6570;&#x3002;&#x670D;&#x52A1;&#x7AEF;&#x4F7F;&#x7528;&#x65F6;&#x8BF7;&#x4F20;&#x9012;&#x51C6;&#x786E;&#x5BA2;&#x6237;&#x7AEF;&#x8FDE;&#x63A5;IP&#x3002;
     * @param boolean $isdel &#x67E5;&#x8BE2;&#x540E;&#x662F;&#x5426;&#x5220;&#x9664;&#x6570;&#x636E;
     * @return array
     *              errno &#x9519;&#x8BEF;&#x7801;
     *              errmsg &#x9519;&#x8BEF;&#x4FE1;&#x606F;
     *              fields &#x53EF;&#x7528;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5;&#x3002; &#x9519;&#x8BEF;&#x7801;&#x4E3A; 0&#x3001;1 &#x5747;&#x5305;&#x542B;.
     *              authed &#x5DF2;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5;&#x4E0E;&#x9A8C;&#x8BC1;&#x65F6;&#x95F4;&#xFF0C;&#x9519;&#x8BEF;&#x7801;&#x4E3A; 0 &#x65F6;&#x8F93;&#x51FA;&#x3002;
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">query</span><span class="token punctuation">(</span><span class="token variable">$userid</span><span class="token punctuation">,</span> <span class="token variable">$baiduid</span><span class="token punctuation">,</span> <span class="token variable">$ip</span><span class="token punctuation">,</span> <span class="token variable">$isdel</span> <span class="token operator">=</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$isdel</span> <span class="token operator">=</span> <span class="token function">intval</span><span class="token punctuation">(</span><span class="token variable">$isdel</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">setNames</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">NAME_DEFAULT</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token keyword">do</span> <span class="token punctuation">{</span>
            <span class="token variable">$names</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span><span class="token punctuation">;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">isSecure</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>

                <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">empty</span><span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authsid</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">break</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>

                <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$names</span> <span class="token keyword">as</span> <span class="token variable">$key</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$value</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token variable">$names</span><span class="token punctuation">[</span><span class="token variable">$key</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token variable">$value</span> <span class="token punctuation">.</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authsid</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
                <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span> <span class="token operator">=</span> <span class="token variable">$names</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">is_array</span><span class="token punctuation">(</span><span class="token variable">$names</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token variable">$names</span> <span class="token operator">=</span> <span class="token variable">$names</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

            <span class="token comment">/*$this-&gt;authed = $this-&gt;sapi-&gt;getJSON($this-&gt;url, array(
                &apos;action&apos;  =&gt; &apos;query&apos;,
                &apos;isdel&apos;   =&gt; $isdel,
                &apos;userid&apos;  =&gt; $userid,
                &apos;baiduid&apos; =&gt; $baiduid,
                &apos;names&apos;   =&gt; $names,
                &apos;time&apos;    =&gt; time(),
                &apos;ip&apos;      =&gt; $ip,
            ));*/</span>

            <span class="token variable">$post</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
                <span class="token single-quoted-string string">&apos;action&apos;</span>  <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token single-quoted-string string">&apos;query&apos;</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;isdel&apos;</span>   <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$isdel</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;userid&apos;</span>  <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$userid</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;baiduid&apos;</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$baiduid</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;names&apos;</span>   <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$names</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;time&apos;</span>    <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;ip&apos;</span>      <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token variable">$ip</span><span class="token punctuation">,</span>
            <span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token variable">$post</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;appid&apos;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getAppid</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token variable">$post</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;tpl&apos;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getTpl</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token variable">$post</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;sig&apos;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">sapi</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token function">getSign</span><span class="token punctuation">(</span><span class="token variable">$post</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token variable">$result</span> <span class="token operator">=</span> <span class="token function">ral</span><span class="token punctuation">(</span><span class="token single-quoted-string string">&apos;ppui-api&apos;</span><span class="token punctuation">,</span> <span class="token single-quoted-string string">&apos;post&apos;</span><span class="token punctuation">,</span> <span class="token variable">$post</span><span class="token punctuation">,</span> <span class="token keyword">array</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
                <span class="token single-quoted-string string">&apos;pathinfo&apos;</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token single-quoted-string string">&apos;/v2/sapi/authwidget&apos;</span><span class="token punctuation">,</span>
                <span class="token single-quoted-string string">&apos;useragent&apos;</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token single-quoted-string string">&apos;Mozilla/5.0&apos;</span><span class="token punctuation">,</span>
            <span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token variable">$result</span> <span class="token operator">=</span> <span class="token function">json_decode</span><span class="token punctuation">(</span><span class="token variable">$result</span><span class="token punctuation">,</span> <span class="token boolean constant">true</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span> <span class="token operator">=</span> <span class="token function">is_array</span><span class="token punctuation">(</span><span class="token variable">$result</span><span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token variable">$result</span> <span class="token punctuation">:</span> <span class="token keyword">array</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token boolean constant">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x9700;&#x8981;&#x9A8C;&#x8BC1;&#x7684;&#x5B57;&#x6BB5;
     * @var array
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$fields</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x9A8C;&#x8BC1;&#x9009;&#x62E9;&#x6027;
     * @var string
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$select</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x6570;&#x636E;&#x8D85;&#x65F6;&#x65F6;&#x95F4;
     * @var int
     */</span>
    <span class="token keyword">private</span> <span class="token variable">$expire</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x8BBE;&#x5B9A;&#x9A8C;&#x8BC1;&#x5B57;&#x6BB5;
     * isAuthed &#x524D;&#x4F7F;&#x7528;
     *
     * @param array $fields &#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#xFF0C;&#x53EF;&#x9009;&#x53C2;&#x6570;&#x5EFA;&#x8BAE;&#x7559;&#x7A7A;&#x3002;&#x4E3A;&#x7A7A;&#x65F6;&#x8FD4;&#x56DE;&#x6240;&#x6709;&#x53EF;&#x7528;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#x3002;&#x53EF;&#x9009;&#x586B;&#x591A;&#x4E2A;&#xFF0C;&#x5747;&#x4E0D;&#x5B58;&#x5728;&#x65F6;&#x8FD4;&#x56DE;&#x53EF;&#x7528;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;&#x3002;
     * @param string $select &#x53EF;&#x9009;&#x62E9;&#x6027;
     *                        top &#x9009;&#x62E9;&#x6700;&#x9AD8;&#x7EA7;&#x522B;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F; Bd_Passport_AuthWidget::SELECT_TOP
     *                        any &#x53EF;&#x4EFB;&#x610F;&#x9009;&#x62E9;&#x9A8C;&#x8BC1;&#x65B9;&#x5F0F;   Bd_Passport_AuthWidget::SELECT_ANY
     * @return Bd_Passport_AuthWidget
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">setFields</span><span class="token punctuation">(</span><span class="token variable">$fields</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">,</span> <span class="token variable">$select</span> <span class="token operator">=</span> <span class="token constant">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">fields</span> <span class="token operator">=</span> <span class="token variable">$fields</span><span class="token punctuation">;</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">select</span> <span class="token operator">=</span> <span class="token variable">$select</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x8BBE;&#x5B9A;&#x9A8C;&#x8BC1;&#x8D85;&#x65F6;
     * isAuthed &#x524D;&#x4F7F;&#x7528;
     *
     * @param int $expire &#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x4E0D;&#x53EF;&#x8D85;&#x8FC7; 24 &#x5C0F;&#x65F6;&#x3002;
     * @return Bd_Passport_AuthWidget
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">setExpire</span><span class="token punctuation">(</span><span class="token variable">$expire</span> <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">expire</span> <span class="token operator">=</span> <span class="token variable">$expire</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$this</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token comment">/**
     * &#x5224;&#x65AD;&#x7528;&#x6237;&#x662F;&#x5426;&#x5DF2;&#x9A8C;&#x8BC1;
     *
     * &#x4F7F;&#x7528;&#x524D;&#x9700;&#x8981;&#x6267;&#x884C; query
     *
     * @example
     *          $widget = new Bd_Passport_AuthWidget(1, &apos;pp&apos;);
     *          $authed = $widget-&gt;setNames(&apos;test&apos;)-&gt;query(&apos;104113153&apos;, &apos;test123&apos;, &apos;127.0.0.1&apos;);
     *          $isAuthed = $widget-&gt;isAuthed();
     *
     * @param boolean $allowNotReal &#x662F;&#x5426;&#x5141;&#x8BB8;&#x975E;&#x771F;&#x5B9E;&#x7528;&#x6237;&#xFF08;&#x672A;&#x7ED1;&#x5B9A;&#x90AE;&#x7BB1;&#xFF0C;&#x624B;&#x673A;&#x7B49;&#xFF09;
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function">isAuthed</span><span class="token punctuation">(</span><span class="token variable">$allowNotReal</span> <span class="token operator">=</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">false</span><span class="token punctuation">;</span>

        <span class="token keyword">do</span> <span class="token punctuation">{</span>
            <span class="token variable">$names</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">names</span><span class="token punctuation">;</span>
            <span class="token variable">$fields</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">fields</span><span class="token punctuation">;</span>
            <span class="token variable">$select</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">select</span><span class="token punctuation">;</span>
            <span class="token variable">$expire</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">expire</span><span class="token punctuation">;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">break</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token comment">/**
             * &#x68C0;&#x67E5;&#x53EF;&#x6821;&#x9A8C;&#x7684;&#x5B57;&#x6BB5;
             */</span>
            <span class="token variable">$binds</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;fields&apos;</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token variable">$allowNotReal</span><span class="token punctuation">;</span>
                <span class="token keyword">break</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;errno&apos;</span><span class="token punctuation">]</span> <span class="token operator">!==</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">break</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token variable">$fields</span> <span class="token operator">=</span> <span class="token keyword">array</span><span class="token punctuation">(</span>
                    self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_EMAIL</span><span class="token punctuation">,</span>
                    self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_MOBILE</span><span class="token punctuation">,</span>
                    self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_OTP</span><span class="token punctuation">,</span>
                    self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_QRCODE</span><span class="token punctuation">,</span>
                    self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ONEKEY</span>
                <span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$select</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token variable">$select</span> <span class="token operator">=</span> self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">SELECT_ANY</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token variable">$expire</span> <span class="token operator">||</span> <span class="token variable">$expire</span> <span class="token operator">&gt;</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token variable">$expire</span> <span class="token operator">=</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>


            <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$names</span> <span class="token keyword">as</span> <span class="token variable">$name</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;authed&apos;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token variable">$name</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">continue</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>

                <span class="token variable">$authed</span> <span class="token operator">=</span> <span class="token variable">$this</span><span class="token operator">-</span><span class="token operator">&gt;</span><span class="token property">authed</span><span class="token punctuation">[</span><span class="token single-quoted-string string">&apos;authed&apos;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token variable">$name</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$select</span> <span class="token operator">==</span> self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">SELECT_TOP</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                    <span class="token keyword">do</span> <span class="token punctuation">{</span>
                        <span class="token comment">/**
                         * &#x5FC5;&#x987B;&#x4F7F;&#x7528;&#x624B;&#x673A;&#x6216;APP&#x9A8C;&#x8BC1;
                         */</span>
                        <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">false</span><span class="token punctuation">;</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_MOBILE</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_MOBILE</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_MOBILE</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_MOBILE</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>

                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_OTP</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_OTP</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_OTP</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_OTP</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_QRCODE</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_QRCODE</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_QRCODE</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_QRCODE</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>

                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ONEKEY</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ONEKEY</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ONEKEY</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ONEKEY</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>

                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$toped</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token keyword">break</span><span class="token punctuation">;</span>
                        <span class="token punctuation">}</span>

                        <span class="token comment">/**
                         * &#x5FC5;&#x987B;&#x4F7F;&#x7528;&#x90AE;&#x7BB1;&#x9A8C;&#x8BC1;
                         */</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_EMAIL</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_EMAIL</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_EMAIL</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token keyword">break</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_EMAIL</span><span class="token punctuation">]</span> <span class="token operator">&gt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token keyword">break</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                            <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                        <span class="token punctuation">}</span>

                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$toped</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token keyword">break</span><span class="token punctuation">;</span>
                        <span class="token punctuation">}</span>

                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_PASSWORD</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_PASSWORD</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_PASSWORD</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_PASSWORD</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$toped</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token keyword">break</span><span class="token punctuation">;</span>
                        <span class="token punctuation">}</span>

                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_MOBILE</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_MOBILE</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_MOBILE</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_MOBILE</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$toped</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token keyword">break</span><span class="token punctuation">;</span>
                        <span class="token punctuation">}</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_EMAIL</span><span class="token punctuation">,</span> <span class="token variable">$fields</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span> <span class="token operator">&amp;&amp;</span> <span class="token function">in_array</span><span class="token punctuation">(</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_EMAIL</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token variable">$toped</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_EMAIL</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span>self<span class="token punctuation">:</span><span class="token punctuation">:</span><span class="token constant">FIELD_ORIGINAL_EMAIL</span><span class="token punctuation">]</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token variable">$toped</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                            <span class="token keyword">break</span><span class="token punctuation">;</span>
                        <span class="token punctuation">}</span>
                    <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token boolean constant">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
                    <span class="token comment">/* $select == self::SELECT_ANY */</span>
                    <span class="token keyword">foreach</span> <span class="token punctuation">(</span><span class="token variable">$fields</span> <span class="token keyword">as</span> <span class="token variable">$field</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span><span class="token variable">$field</span><span class="token punctuation">,</span> <span class="token variable">$binds</span><span class="token punctuation">)</span> <span class="token operator">!==</span> <span class="token boolean constant">false</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>

                            <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">isset</span><span class="token punctuation">(</span><span class="token variable">$authed</span><span class="token punctuation">[</span><span class="token variable">$field</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&amp;&amp;</span> <span class="token punctuation">(</span><span class="token function">time</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token variable">$authed</span><span class="token punctuation">[</span><span class="token variable">$field</span><span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">&lt;</span> <span class="token variable">$expire</span>
                            <span class="token punctuation">)</span> <span class="token punctuation">{</span>
                                <span class="token variable">$pass</span> <span class="token operator">=</span> <span class="token boolean constant">true</span><span class="token punctuation">;</span>
                                <span class="token keyword">break</span> <span class="token number">2</span><span class="token punctuation">;</span>
                            <span class="token punctuation">}</span>
                        <span class="token punctuation">}</span>
                    <span class="token punctuation">}</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span> <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token boolean constant">false</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token keyword">return</span> <span class="token variable">$pass</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
</code></pre>
<footer class="page-footer-ex"> <span class="page-footer-ex-copyright"> &#xA9; fzu </span> &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; <span class="page-footer-ex-footer-update"> &#x6700;&#x540E;&#x4FEE;&#x6539;: 2020-07-14 </span> </footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="auth.html" class="navigation navigation-prev " aria-label="Previous page: 合法性校验">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../portrait/" class="navigation navigation-next " aria-label="Next page: 头像接入">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"附:验证控件SDK源码","level":"3.1.6","depth":2,"next":{"title":"头像接入","level":"3.2","depth":1,"path":"open/portrait/index.md","ref":"open/portrait/index.md","articles":[]},"previous":{"title":"合法性校验","level":"3.1.5","depth":2,"path":"open/auth-widget/auth.md","ref":"open/auth-widget/auth.md","articles":[]},"dir":"ltr"},"config":{"plugins":["multipart","codeblock-filename","anchor-navigation-ex","page-footer-ex","prism","splitter","custom-js-css","-sharing"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-okaidia.css"]},"page-footer-ex":{"copyright":"© fzu","markdown":true,"update_format":"YYYY-MM-DD","update_label":"最后修改:"},"splitter":{},"search":{},"multipart":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"codeblock-filename":{},"custom-js-css":{"css":["assets/css/main.css","assets/css/folding-chapters.css"],"js":["assets/js/folding-chapters.js"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true}},"theme":"default","author":"xiajie <xiajie01@baidu.com>","pdf":{"pageBreaksBefore":"/","headerTemplate":null,"paperSize":"a4","margin":{"right":62,"left":62,"top":36,"bottom":36},"fontSize":12,"fontFamily":"Arial","footerTemplate":null,"chapterMark":"pagebreak","pageNumbers":true},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"","variables":{},"title":"Passport业务手册","language":"zh-hans","links":{"sharing":{"all":null,"facebook":null,"google":null,"twitter":null,"weibo":null},"sidebar":{}},"gitbook":"*","description":"Passport业务手册","extension":null},"file":{"path":"open/auth-widget/code.md","mtime":"2020-07-14T00:09:41.309Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-14T00:46:01.528Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-custom-js-css/fc1111ed2beb4b0151beb99a0ab82def-folding-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

